﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using mshtml;
using System.Xml.Linq;

namespace jTest
{
    public class ScrapeResult
    {
        public ScrapeResult(IHTMLElement element)
        {
            if (element == null)
                throw new ArgumentNullException("element");

            this.Element = element;
        }

        public IHTMLElement Element 
        { 
            get; 
            private set; 
        }

		//public XElement XElement 
		//{
		//    get
		//    {
		//        return this.Element.ToXElement();
		//    }
		//}

        public String Text 
        {
            get
            {
                return this.Element.innerText;
            }
        }

        public String Html
        {
            get
            {
                return this.Element.outerHTML;
            }
        }

        public override string ToString()
        {
            return this.Text;
        }
    }
}
